﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Http;

namespace SelfHosting.Controllers
{
    public class ContactController : AbstractApiController<Contact>
    {
        [HttpGet, ActionName("Contacts")]
        public IQueryable<Contact> GetContacts()
        {

            return new Contact[]
                {
                    new Contact() {Name = "Dupond", Phone = "06 54 78 12154"},
                    new Contact() {Name = "Chama", Phone = "0542124874"}
                }.AsQueryable();
        }
    }

    public class Contact
    {
        public string Name { get; set; }

        public string Phone { get; set; }
    }
}
